/*
package cn.zymall.user.controller;*/
/*
package cn.zymall.user.controller;

import cn.zymall.common.controller.crud.BaseController;
import cn.zymall.common.model.Permissions;
import cn.zymall.user.service.PermissionService;
import com.alibaba.fastjson.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

*//*


import cn.zymall.common.controller.crud.BaseController;
import cn.zymall.common.model.Permissions;
import cn.zymall.user.service.PermissionService;
import com.alibaba.fastjson.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

*/
/**
 * @ClassName: PermissionController
 * @Description: 权限表(Permissions) 控制层
 * @author: 欧泽昌
 * @date: 2020/8/22 15:11
 * @version: V1.0
 *//*


@RestController
@RequestMapping("Permissions")
public class PermissionController extends BaseController<PermissionService, Permissions> {
	@Autowired
	PermissionService permissionService;
	*/
/**
	 * @Author 欧泽昌
	 * @Description // 查询全部权限
	 * @Date 2020/8/25 16:01
	 * @Param []
	 * @return java.util.List<cn.zymall.common.model.Permissions>
	 **//*


import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

@RequestMapping("queryAll")
	public List<Permissions> queryAll() {
		return permissionService.queryAll();
	}
	*/
/**
	 * @Author 欧泽昌
	 * @Description // 新增权限
	 * @Date 2020/8/25 16:01
	 * @Param []
	 * @return java.util.List<cn.zymall.common.model.Permissions>
	 **//*

	@Override
	public boolean insert(@RequestBody Permissions bean) {
		return super.insert(bean);
	}
	*/
/**
	 * @Author 欧泽昌
	 * @Description // 新增权限 返回新增对象id
	 * @Date 2020/8/25 16:01
	 * @Param []
	 * @return java.util.List<cn.zymall.common.model.Permissions>
	 **//*

	@RequestMapping("insertPermissions")
	public int insertPermissions(@RequestBody Permissions bean) {
		bean.setStatus(1);
		permissionService.insertPermissions(bean);
		return bean.getPermissionsId();
	}

	*/
/**
	 * @Author 欧泽昌
	 * @Description // 批量修改权限状态
	 * @Date 2020/8/25 16:01
	 * @Param []
	 * @return java.util.List<cn.zymall.common.model.Permissions>
	 **//*

	@PostMapping("batchUpdate")
	public int batchUpdate(@RequestBody Map map) {
		List<Permissions> list = null;
		for (Object obj : map.values()) {
			list = JSONObject.parseArray(obj.toString(), Permissions.class);
		}
		return permissionService.batchUpdate(list);
	}
	*/
/**
	 * @Author 欧泽昌
	 * @Description //根据名称模糊查询
	 * @Date 2020/8/25 16:03
	 * @Param [name]
	 * @return java.util.List<cn.zymall.common.model.Permissions>
	 **//*

	@GetMapping("queryName")
	public List<Permissions> queryName(String name) {
		return this.permissionService.queryName(name);
	}

	;
}

*/
